﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OptionalContentPlaceHolder.aspx.cs" Inherits="OpenWaves.Web.Showcase.OptionalContentPlaceHolder" %>
<!DOCTYPE html>

<html>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form runat="server">
            <div>
                <h1>OptionalContent, DataItem == null</h1>
                <ow:OptionalContentPlaceholder runat="server" DataItem="<%#null%>">
                    <p>This should not be rendered or bound <%#((object) null).ToString()%></p>
                </ow:OptionalContentPlaceholder>
            </div>
            <div>
                <h1>OptionalContent, DataItem != null</h1>
                <ow:OptionalContentPlaceholder runat="server" DataItem="<%#new object()%>">
                    <p>This should be bound: <%#DateTime.Now%></p>
                </ow:OptionalContentPlaceholder>
            </div>
            <div>
                <h1>OptionalContent with Fallback, DataItem == null</h1>
                <ow:OptionalContentWithFallbackPlaceholder runat="server" DataItem="<%#null%>">
                    <Content>
                        <p>This should not be rendered or bound <%#((object) null).ToString()%></p>
                    </Content>
                    <FallbackContent>
                        <p>This should be bound: <%#DateTime.Now%></p>
                    </FallbackContent>
                </ow:OptionalContentWithFallbackPlaceholder>
            </div>
            <div>
                <h1>OptionalContent with Fallback, DataItem != null</h1>
                <ow:OptionalContentWithFallbackPlaceholder runat="server" DataItem="<%#DateTime.Now%>">
                    <Content><p>This should be bound: <%#DateTime.Now%></p></Content>
                    <FallbackContent>
                        <p>This should not be rendered or bound <%#((object) null).ToString()%></p>
                    </FallbackContent>
                </ow:OptionalContentWithFallbackPlaceholder>
            </div>
        </form>
    </body>
</html>
